// 库存管理接口
import request from "@/common/request.js";
const api = {
  warehouse: "/warehouse/",
  staff: "/staff/",
};

const daWarehouseApi = {
  get_staff(params) {
    return request({
      url: api.staff,
      method: "get",
      params,
    });
  },

  get_warehouse(params) {
    return request({
      url: api.warehouse,
      method: "get",
      params,
    });
  },

  warehouse_detail(id) {
    return request({
      url: api.warehouse + id,
      method: "get",
    });
  },

  post_warehouse(data) {
    return request({
      url: api.warehouse,
      method: "post",
      data,
    });
  },

  patch_warehouse(data, id) {
    return request({
      url: api.warehouse + id + "/",
      method: "patch",
      data,
    });
  },

  delete_warehouse(id) {
    return request({
      url: api.warehouse + id + "/",
      method: "delete",
    });
  },
};
export default daWarehouseApi;
